package sk.saly.clientStub;

import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import sk.saly.Data;
import sk.saly.MyServicePortType;

public class Example{
    
    public static void main(String[] args) throws MalformedURLException
	{
    	Service service = Service.create(                           
    			new URL("http://localhost:8080/ejb-web-service-0.0.1-SNAPSHOT/MyService/MyServicePortType?WSDL"),
    			new QName("http://ws.saly.com","MyService")
    			);
    	MyServicePortType myServicePortType = service.getPort(MyServicePortType.class); 
    	Data response = myServicePortType.sendData(new Data());
    	System.out.println(response.getStudents().get(0).getName());
	}

}
